<template>
  <span>小修保养x次</span>
  <span>专项维修x次</span>
  <records
    :selection="false"
    :columns="columns"
    :data-source="dataSource"
    :loading="loading"
    :pagination="pagination"
    @change-page="changePage"
  />
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import Records from '@/components/Records/index.vue'
import { getUsersByPage } from '@/api/user'
import useSearch from '@/hooks/useSearch'
import { MAINT_COLUMNS } from '../config'

export default defineComponent({
  name: 'Users',
  emits: {
    'update:form': null,
  },
  components: {
    Records,
  },
  setup() {
    const { dataSource, changePage, loading, pagination } = useSearch(getUsersByPage)

    return {
      dataSource,
      columns: MAINT_COLUMNS,
      loading,
      changePage,
      pagination,
    }
  },
})
</script>

<style lang="scss" scoped>
</style>
